#{extends 'mainNoHeader.html' /} #{set title:'LogView' /}
<head>
<script type="text/javascript">
	$(function(usercurrent) {
		javascript: fillLogView();
	});
</script>

<script type="text/javascript">
	function fillLogView() {
		$
				.getJSON(
						'@{UsersController.viewLog()}',
						{
							'organizationId' : '${organizationId}'
						},
						function(data) {
							var result = "";
							result = "<table id=\"tableContainer\" width=\"200\" border=\"0\">";
							result += "<tr><th scope=\"col\">Log Entries</th><th>Date</th></tr>";
							for ( var i = document.getElementById('logCounter').value; i < data.length; i++) {
								if (data[i] != null) {
									var innerList = data[i].split("^#^");
									result += "<tr> <td> <label> "
											+ innerList[0]
											+ "</label> </td> <td> "
											+ innerList[1] + " </td> </tr>";
								}
							}
							result += "</table>";
							document.getElementById('logTable').innerHTML = result;
						});
	}
</script>
</head>
<!------------------------------------------------------------------------------------------->
<body>
	<input type="hidden" value="0" id="logCounter">
	<!-- LOGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGGG -->
	<div id="content">
		<div id="logTable"></div>
		<p>&nbsp;</p>
	</div>
	<div class="sidebar"></div>
</body>
